Logout does a full page reload

Description

When the user logs out, do you want this UX component to reload? If you check this option, the component's layout is re-computed on the server (and controls on the UX for which membership in security groups are required are hidden).

Here is why this is an important property to understand:

Assume that when you design the UX component you set the security property on certain controls in the component so that they are only visible to users who are in a certain group (i.e. security role

For example, you might have a button called 'Increase Salary' and you might have set the security on this button to only show the button for users who are in the 'Manager' group.

Assume that the current user is logged in as a member of the 'Manager' group - so she sees this button.

After this user logs out, you will want to ensure that this button is no longer visible. So, forcing the component to reload will cause the server to re-compute the layout of the UX component, and the button will be removed when the server sends back a re-rendered version of the component - because the user will no longer be logged in as a member of the 'Manager' group.

Forcing a Reload of the UX Component After Login

If you are forcing a reload after the UX component loads, you will likely also want to set the 'Logout does full page reload' property to true.

images/ux_login_serversideevnts.gif

After the user has logged in you might want to force the UX component to reload. Consider the following scenario which explains a use case for this option:

Assume that the application you have built is a single UX component, and it has integrated login functionality. Assume also that this component has certain controls that have security on them (for example a 'Set Salary' button that is only visible to member of the 'Manager' group).

When the UX is initially loaded, the 'Set Salary' button will not be visible (because the user is not yet logged in).

Now assume that the user enters their username and password and clicks the login button. This will fire an Ajax callback and the user will be authenticated. Assume that the user is now authenticated and is part of the 'Manager' group.

This user should now see the 'Set Salary' button, but does not because when the UX was originally rendered, the user was not logged in.

However, by forcing a reload after login, the component will be re-rendered on the server and the user will see the 'Set salary' button.

The way in which you force a reload of the UX component after login is by setting the e.url property in the onLogin server-side event. For example, you could add this code to the onLogin server-side event:

e.url = "<thisComponent>"

See Also